CC = gcc

INCLUDDIR = -I include

OBJDIR = obj

TEST_RES := bin/concert_ticket_system

OBJECTS = $(OBJDIR)/main.o \
		  $(OBJDIR)/app.o \
	      $(OBJDIR)/login.o \
		  $(OBJDIR)/concert_ticket.o \
		  $(OBJDIR)/input_judge.o \
		  $(OBJDIR)/progress_bar.o

$(OBJDIR)/%.o:%.c

	$(CC) $(INCLUDDIR) -c $< -o $@

$(OBJDIR)/%.o:./package/%.c

	$(CC) $(INCLUDDIR) -c $< -o $@

$(TEST_RES):$(OBJECTS)

	$(CC) $^ -o $@

.PHONY:clean

clean:
	rm -rf  .*.cmd *.o *.mod.c  .tep_versions Module.symvers .Makefile.swp $(TEST_RES)
	rm -rf  $(OBJECTS)
